<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>

<head>
    <script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
    <link type="text/css" rel="stylesheet" href="/css/style.css">
    <!--uploadify plugin-->
    <link rel="stylesheet" type="text/css" href="/js/uploadify/uploadify.css">
	<script type="text/javascript" src="/js/uploadify/jquery.uploadify-3.1.min.js"></script>
	<script>
	$(function() {
        $('#file_upload').uploadify({
            'buttonText':'Browse',
            'auto'     : false,
            'method'   : 'post',
            'fileObjName' : 'myfile',
            'swf': '/js/uploadify/uploadify.swf',
            'uploader': 'songupload',
            'debug':false,
            'onUploadStart' : function(file) {
                var isWeekly= ($("#isWeekly").attr("checked")=="checked");
                //alert(isWeekly+","+$("#isWeekly").attr("checked"));
                $("#file_upload").uploadify("settings", "formData", {'weekly':isWeekly});
             }
            // Put your options here
        });
        $("#uploadBtnArea").insertAfter($("#file_upload-button"));
    });
	</script>
<title>Init upload</title>
</head>
<body>
<div id="mywrapper" >
   <jsp:include page="navigation.jsp"/>
    <div class="contentArea">
	<p class="uploadtitle">
	Admin Uploaded File(s)
    </p>
    <p>
        <input type="checkbox"  name="weekly" id="isWeekly"/>Is Weekly Upload?
    </p>
 <!--
<form method="post" action="upload" enctype="multipart/form-data">
<input type="text" name="description" /> <br/>
<input type="file" name="myfile" /><br/>
<input type="submit" />
</form>
 -->
    <div>
        <p>
            <input type="file" name="file_upload" id="file_upload" />
            <div id="uploadBtnArea">
                <a id="uploadBtn" class="uploadBtn" href="javascript:$('#file_upload').uploadify('upload','*')">Start Upload</a>
                <a id="cancelBtn" class="uploadBtn" href="javascript:$('#file_upload').uploadify('cancel','*')">Cancel All</a>
           </div>
        </p>
     </div>
    </div>
</div>
</body>
</html>